Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix check_comfy_repo #108

Closed
wants to merge 2 commits into from
Closed

Fix check_comfy_repo #108

wants to merge 2 commits into from

Conversation

huchenlei
Copy link
Member

Currently check_comfy_repo is returning Tuple[bool, Optional[git.Repo]], but most call site is treating the return value as a bool, so the check at most callsites just always pass, because the a tuple of 2 items always evals to True.

This PR does following changes:

  • Rename check_comfy_repo to get_comfy_repo as the git.Repo is the most important return value
  • Simplify the return value to Optional[git.Repo] as the bool can be obtained from nullity of Optional[git.Repo]
  • Change call site where a tuple of 2 itmes are expected

Note:
This will likely break things. So don't merge it until we have more test coverage.

@huchenlei
Copy link
Member Author

Closing as conflict with #109

@huchenlei huchenlei closed this Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant